<div class="page-header">
    <h2><b>Chuyên mục: Hỏi đáp</b></h2>
</div>
<div class="panel panel-info">
    <div class="panel-body">
        <?php
        echo form_open('hoidap/hoidap/add_question');
        ?>
        <input type="hidden" name="session" value="<?=$session?>">
        <div class="form-group row">
            <div class="col-xs-4">
                <label class="control-label" for="tieude">Tiêu đề</label>
            </div>
            <div class="col-xs-6">
                <input 
                    name="tieude" type="text" value="<?php echo set_value('tieude'); ?>" 
                    Class="form-control" placeholder="Chủ đề câu hỏi...">
                    <?php echo form_error('tieude', '<p class="text-danger" style="font-size:15px;">', '</p>'); ?>
            </div>
        </div>
        <div class="form-group row">
            <div class="col-xs-4">
                <label class="control-label" for="noidung">Nội dung câu hỏi</label>
            </div>
            <div class="col-xs-6">
                <textarea 
                    class="form-control" rows="3" name="noidung" 
                    placeholder="Nhập nội dung câu hỏi ..." value="<?php echo set_value('tieude'); ?>"></textarea>
                    <?php echo form_error('noidung', '<p class="text-danger" style="font-size:15px;">', '</p>'); ?>
            </div>
        </div>
        <div class="form-group row">
            <div class="col-xs-4">
                <label class="control-label" for="monhoc_id">Môn Học</label>
            </div>
            <div class="col-xs-6">
                <select name="monhoc_id" class="form-control">
                    <?php foreach ($monhoc as $row): ?>
                        <option value="<?= $row['id']; ?>"><?= $row['TenMonHoc']; ?></option>
                    <?php endforeach; ?>
                </select>
            </div>
        </div>
        <?php foreach ($image_crud->css_files as $file): ?>
            <link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
        <?php endforeach; ?>
        <?php foreach ($image_crud->js_files as $file): ?>
            <script src="<?php echo $file; ?>"></script>
        <?php endforeach; ?>
        <div>
            <?php echo $image_crud->output; ?>
        </div>
        <div class="row">
            <div class="col-md-4"></div>
            <div class="col-md-4">
                <input type="submit" class="btn btn-primary" value="Đăng câu hỏi">
            </div>
            <div class="col-md-4"></div>            
        </div>
        <?php echo form_close(); ?>

    </div>
</div>